﻿CREATE TABLE [dbo].[SeriiNumerice] (
    [IdSerie]           NVARCHAR (20)  NOT NULL,
    [CodUnitate]        SMALLINT       CONSTRAINT [DF_SeriiNumerice_CodUnitate] DEFAULT ((0)) NOT NULL,
    [Descriere]         NVARCHAR (100) NOT NULL,
    [NrStart]           NVARCHAR (20)  NOT NULL,
    [NrEnd]             NVARCHAR (20)  NULL,
    [UltimaDataFolosit] DATETIME       NULL,
    [UltimulNrFolosit]  NVARCHAR (20)  NULL,
    [NumarImplicit]     BIT            CONSTRAINT [DF_SeriiNumerice_NumarImplicit] DEFAULT ((0)) NULL,
    [NumarManual]       BIT            CONSTRAINT [DF_SeriiNumerice_NumarManual] DEFAULT ((0)) NULL,
    [Serie]             VARCHAR (10)   NULL,
    CONSTRAINT [PK_SeriiNumerice] PRIMARY KEY CLUSTERED ([IdSerie] ASC, [CodUnitate] ASC),
    CONSTRAINT [FK_SeriiNumerice_Unitati] FOREIGN KEY ([CodUnitate]) REFERENCES [dbo].[Unitati] ([CodUnitate])
);

